package com.bana.fvs.app.mvp.model;

import com.bana.fvs.app.mvp.ConstantsValue;
import com.bana.fvs.app.mvp.contract.WorkModeContract;
import com.bana.fvs.app.util.CommonUtils;
import com.wei.commonlibrary.net.OkhttpRequest;

import java.util.HashMap;

/**
 * Created by wei on 2018/3/3.
 */

public class WorkModeModel extends WorkModeContract.AbsWorkModeModel {
    @Override
    public void onStart() {

    }

    @Override
    public OkhttpRequest getWorkMode(String token) {
        return okhttpRequest.url(iApiService.getFogWorkModeDict(CommonUtils.getParams(token)));
    }

    @Override
    public OkhttpRequest http_WorkModeUpdate(String token, String wqbm, String gzms) {
        HashMap<String, Object> params = new HashMap<>();
        params.put(ConstantsValue.TOKEN, token);
        params.put(ConstantsValue.WQBM, wqbm);
        params.put(ConstantsValue.GZMS, gzms);
        return okhttpRequest.url(iApiService.getFogWorkModeUpdate(params));
    }

    @Override
    public OkhttpRequest getVisiblityWorkMode(String token) {
        return okhttpRequest.url(iApiService.getVisibilityWorkModeDicts(CommonUtils.getParams(token)));
    }

    @Override
    public OkhttpRequest http_VisiblityWorkModeUpdate(String token, String wqbm, String gzms) {
        HashMap<String, Object> params = new HashMap<>();
        params.put(ConstantsValue.TOKEN, token);
        params.put(ConstantsValue.WQBM, wqbm);
        params.put(ConstantsValue.GZMS, gzms);
        return okhttpRequest.url(iApiService.visibilityWorkModeUpdate(params));
    }
}
